"""
@File    : test_r4.py
@Author  : sharan
@Time    : 2020/12/8 20:06
@Desc    :
"""

import requests
import json

class RunMain():

    def send_get(self, url, data):
        res = requests.get(url, data)
        return res

    def send_post(self, url, data):
        res = requests.post(url, data)
        return res

    def run_main(self, url, method, data=None):
        if method == 'GET':
            res = self.send_get(url, data)
        else:
            res = self.send_post(url, data)

        return res

